package com.bishe.dao;

import com.bishe.pojo.Apply;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 申请数据层
 * @date 2022/03/20 41:08:41
 */
public interface ApplyDao {

    @Select("select * from apply")
    List<Apply> findAll();


    @Select("select * from apply where id = #{id}")
    Apply findById(@Param("id") String id);

    @Delete("delete  from apply where id = #{id}")
    void deleteById(@Param("id") String id);


    @Update("update apply set id = #{id},title = #{title},content = #{content},createTime = #{createTime},createBy = #{createBy}, status = #{status}  where id = #{id}")
    void updateById(Apply apply);


    @Insert("insert into apply (id,title,content,createTime,createBy,status) values(#{id},#{title},#{content},#{createTime},#{createBy},#{status})")
    void save(Apply apply);
}
